import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import Home from '../views/Home.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/number',
    name: '数字扩展',
    component: () => import('../views/number.vue')
  },
  {
    path: '/string',
    name: '字符串扩展',
    component: () => import('../views/string.vue')
  },
  {
    path: '/arr',
    name: '数组扩展',
    component: () => import('../views/arr.vue')
  },
  {
    path: '/date',
    name: '日期扩展',
    component: () => import('../views/date.vue')
  },
  {
    path: '/decorator',
    name: '装饰器',
    component: () => import('../views/decorator.vue')
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
}) 

export default router
